<template>
  <div class="app-container"><h4>每天定时划转资金到指定账号里（如果对应币种的余额足够）</h4>
    <el-row :gutter="15">
      <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
        <el-col :span="13">
          <el-form-item label="手机号" prop="phone">
            <el-input v-model="formData.phone" placeholder="注册了Mixpay App的手机号" :maxlength="11" show-word-limit
              clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="13">
          <el-form-item label="每天" prop="time">
            <el-time-picker v-model="formData.time" format="HH:mm" value-format="HH:mm"
              :picker-options='{"selectableRange":"00:00-23:59"}' :style="{width: '100%'}" placeholder="请选择每天"
              clearable></el-time-picker>
          </el-form-item>
        </el-col>
        <el-col :span="13">
          <el-form-item label="BTC金额" prop="btcAmount">
            <el-input v-model="formData.btcAmount" placeholder="请输入BTC金额" clearable :style="{width: '100%'}">
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="13">
          <el-form-item label="ETH金额" prop="ethAmount">
            <el-input v-model="formData.ethAmount" placeholder="请输入ETH金额" clearable :style="{width: '100%'}">
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="13">
          <el-form-item label="USDT金额" prop="usdtAmount">
            <el-input v-model="formData.usdtAmount" placeholder="请输入USDT金额" clearable
              :style="{width: '100%'}"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="13">
          <el-form-item label="USDC金额" prop="usdcAmount">
            <el-input v-model="formData.usdcAmount" placeholder="请输入USDC金额" clearable
              :style="{width: '100%'}"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="13">
          <el-form-item label="USDT2金额" prop="usdt2Amount">
            <el-input v-model="formData.usdt2Amount" placeholder="请输入USDT2金额" clearable
              :style="{width: '100%'}"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item size="large">
            <el-button type="primary" @click="submitForm">提交</el-button>
            <el-button @click="resetForm">重置</el-button>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
  </div>
</template>
<script>
export default {
  components: {},
  props: [],
  data() {
    return {
      formData: {
        phone: '13466668888',
        time: '16:01',
        btcAmount: '0',
        ethAmount: 0,
        usdtAmount: '0',
        usdcAmount: '0',
        usdt2Amount: '0',
      },
      rules: {
        phone: [{
          required: true,
          message: '注册了Mixpay App的手机号',
          trigger: 'blur'
        }, {
          pattern: /^1(3|4|5|7|8|9)\d{9}$/,
          message: '手机号格式错误',
          trigger: 'blur'
        }],
        time: [{
          required: true,
          message: '请选择每天',
          trigger: 'change'
        }],
        btcAmount: [{
          required: true,
          message: '请输入BTC金额',
          trigger: 'blur'
        }],
        ethAmount: [{
          required: true,
          message: '请输入ETH金额',
          trigger: 'blur'
        }],
        usdtAmount: [{
          required: true,
          message: '请输入USDT金额',
          trigger: 'blur'
        }],
        usdcAmount: [{
          required: true,
          message: '请输入USDC金额',
          trigger: 'blur'
        }],
        usdt2Amount: [{
          required: true,
          message: '请输入USDT2金额',
          trigger: 'blur'
        }],
      },
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    submitForm() {
      this.$refs['elForm'].validate(valid => {
        if (!valid) return
        // TODO 提交表单
      })
    },
    resetForm() {
      this.$refs['elForm'].resetFields()
    },
  }
}

</script>
<style>
</style>
